//
//  SZLArticleDetailViewController.m
//  Shengzhuli
//
//  Created by 卡忙科技 on 16/8/20.
//  Copyright © 2016年 kamangkeji. All rights reserved.
//

#import "SZLArticleDetailViewController.h"
#import "CultureNetService.h"

@interface SZLArticleDetailViewController ()<UIWebViewDelegate>

@property (nonatomic,weak) UIWebView *web;

@end

@implementation SZLArticleDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    UIWebView *web = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, ScreenW, ScreenH-64)];
    web.delegate = self;
    self.web = web;
    [self.view addSubview:web];
    [self getArticleDetail];
    
}

- (void)getArticleDetail
{
    [self showWaiter];
    [CultureNetService articleDetailWithParame:@{@"id":self.ID} response:^(BOOL success, NSString *msg, ArticleListModel *model) {
        [self hideWaiter];
        self.navigationItem.title = model.title;
        [self.web loadHTMLString:model.content baseURL:nil];
    }];
}

@end
